﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using SRD.Model.SRD.DAO;
using SRD.Model.SRD.DTO;
using System.Data;

namespace SRD.Model.SRD.BO
{
    public class ProfissionalBO
    {
      private ProfissionalDAO dao = new ProfissionalDAO();

      public PROFISSIONAL findByID (PROFISSIONAL profissional)
      {
         return dao.findByID(profissional);
      }

      public IQueryable findByAll()
      {
          return dao.findAll();
      }

      public IQueryable findByName(String nomeProjeto, Int32 empresaId)
      {
          return dao.findByName(nomeProjeto, empresaId);
      }

      public IQueryable findProfissionalCargoSetor(Int32 empresaId)
      {
          return dao.findProfissionalCargoSetor(empresaId);
      }

        public String save(PROFISSIONAL profissional)
        {
            return dao.insert(profissional);
        }

        public String update(PROFISSIONAL profissional)
        {
            return dao.update(profissional);
        }

        public String delete(PROFISSIONAL profissional)
        {
            return dao.delete(profissional);
        }

        public PROFISSIONAL findByLogin(String login)
        {
            return dao.findByLogin(login);
        }

        public IQueryable findLiderByEmpresaId(Int32 empresaId)
        {
            
            return dao.findLiderByEmpresaId(empresaId);
        }

        public IQueryable findSetorByEmpresaId(Int32 empresaId)
        {
            SetorBO setor = new SetorBO();
            return setor.findSetorByEmpresaId(empresaId);
        }

        public IQueryable findCargoByEmpresaId(Int32 empresaId)
        {
            CargoBO cargo = new CargoBO();
            return cargo.findCargoByEmpresaId(empresaId);
        }
    }
    
}
